From 630108d958d5bdea7a7546ea07ee7ed242e6255c Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Tue, 25 Aug 2015 13:00:45 -0400 Subject: [PATCH] Add a note to the FAQ about * for library dependencies Fixes #1870 --- src/doc/faq.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/doc/faq.md b/src/doc/faq.md index 8b9b9e5d6..fc1d9416e 100644 --- a/src/doc/faq.md +++ b/src/doc/faq.md @@ -128,6 +128,13 @@ In other words, libraries specify semver requirements for their dependencies but cannot see the full picture. Only end products like binaries have a full picture to decide what versions of dependencies should be used. +# Can libraries use `*` as a version for their dependencies? + +While they _can_, strictly speaking, they should not. A version requirement +of `*` says “This will work with every version ever,” which is never going +to be true. Libraries should always specifiy the range that they do work with, +even if it’s something as general as “every 1.x.y version.” + # Why `Cargo.toml`? As one of the most frequent interactions with Cargo, the question of why the -- 2.30.2